<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: Mime::Type</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">Mime::Type</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../files/vendor/rails/actionpack/lib/action_controller/mime_type_rb.html">
                vendor/rails/actionpack/lib/action_controller/mime_type.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="../Object.html">
                Object
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
Encapsulates the notion of a mime type. Can be used at render time, for
example, with:
</p>
<pre>
  class PostsController &lt; ActionController::Base
    def show
      @post = Post.find(params[:id])

      respond_to do |format|
        format.html
        format.ics { render :text =&gt; post.to_ics, :mime_type =&gt; Mime::Type[&quot;text/calendar&quot;]  }
        format.xml { render :xml =&gt; @people.to_xml }
      end
    end
  end
</pre>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M001658">==</a>&nbsp;&nbsp;
      <a href="#M001657">===</a>&nbsp;&nbsp;
      <a href="#M001648">lookup</a>&nbsp;&nbsp;
      <a href="#M001649">lookup_by_extension</a>&nbsp;&nbsp;
      <a href="#M001653">new</a>&nbsp;&nbsp;
      <a href="#M001652">parse</a>&nbsp;&nbsp;
      <a href="#M001651">register</a>&nbsp;&nbsp;
      <a href="#M001650">register_alias</a>&nbsp;&nbsp;
      <a href="#M001654">to_s</a>&nbsp;&nbsp;
      <a href="#M001655">to_str</a>&nbsp;&nbsp;
      <a href="#M001656">to_sym</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M001648" class="method-detail">
        <a name="M001648"></a>

        <div class="method-heading">
          <a href="#M001648" class="method-signature">
          <span class="method-name">lookup</span><span class="method-args">(string)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001648-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001648-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/mime_type.rb, line 47</span>
47:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">lookup</span>(<span class="ruby-identifier">string</span>)
48:         <span class="ruby-constant">LOOKUP</span>[<span class="ruby-identifier">string</span>]
49:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001649" class="method-detail">
        <a name="M001649"></a>

        <div class="method-heading">
          <a href="#M001649" class="method-signature">
          <span class="method-name">lookup_by_extension</span><span class="method-args">(extension)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001649-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001649-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/mime_type.rb, line 51</span>
51:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">lookup_by_extension</span>(<span class="ruby-identifier">extension</span>)
52:         <span class="ruby-constant">EXTENSION_LOOKUP</span>[<span class="ruby-identifier">extension</span>]
53:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001653" class="method-detail">
        <a name="M001653"></a>

        <div class="method-heading">
          <a href="#M001653" class="method-signature">
          <span class="method-name">new</span><span class="method-args">(string, symbol = nil, synonyms = [])</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001653-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001653-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/mime_type.rb, line 122</span>
122:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">string</span>, <span class="ruby-identifier">symbol</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">synonyms</span> = [])
123:       <span class="ruby-ivar">@symbol</span>, <span class="ruby-ivar">@synonyms</span> = <span class="ruby-identifier">symbol</span>, <span class="ruby-identifier">synonyms</span>
124:       <span class="ruby-ivar">@string</span> = <span class="ruby-identifier">string</span>
125:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001652" class="method-detail">
        <a name="M001652"></a>

        <div class="method-heading">
          <a href="#M001652" class="method-signature">
          <span class="method-name">parse</span><span class="method-args">(accept_header)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001652-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001652-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/mime_type.rb, line 70</span>
 70:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse</span>(<span class="ruby-identifier">accept_header</span>)
 71:         <span class="ruby-comment cmt"># keep track of creation order to keep the subsequent sort stable</span>
 72:         <span class="ruby-identifier">list</span> = []
 73:         <span class="ruby-identifier">accept_header</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/,/</span>).<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">header</span>, <span class="ruby-identifier">index</span><span class="ruby-operator">|</span> 
 74:           <span class="ruby-identifier">params</span> = <span class="ruby-identifier">header</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/;\s*q=/</span>)
 75:           <span class="ruby-identifier">list</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">AcceptItem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">index</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">params</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">params</span>.<span class="ruby-identifier">empty?</span>
 76:         <span class="ruby-keyword kw">end</span>
 77:         <span class="ruby-identifier">list</span>.<span class="ruby-identifier">sort!</span>
 78: 
 79:         <span class="ruby-comment cmt"># Take care of the broken text/xml entry by renaming or deleting it</span>
 80:         <span class="ruby-identifier">text_xml</span> = <span class="ruby-identifier">list</span>.<span class="ruby-identifier">index</span>(<span class="ruby-value str">&quot;text/xml&quot;</span>)
 81:         <span class="ruby-identifier">app_xml</span> = <span class="ruby-identifier">list</span>.<span class="ruby-identifier">index</span>(<span class="ruby-constant">Mime</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span>.<span class="ruby-identifier">to_s</span>)
 82: 
 83:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">text_xml</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">app_xml</span>
 84:           <span class="ruby-comment cmt"># set the q value to the max of the two</span>
 85:           <span class="ruby-identifier">list</span>[<span class="ruby-identifier">app_xml</span>].<span class="ruby-identifier">q</span> = [<span class="ruby-identifier">list</span>[<span class="ruby-identifier">text_xml</span>].<span class="ruby-identifier">q</span>, <span class="ruby-identifier">list</span>[<span class="ruby-identifier">app_xml</span>].<span class="ruby-identifier">q</span>].<span class="ruby-identifier">max</span>
 86: 
 87:           <span class="ruby-comment cmt"># make sure app_xml is ahead of text_xml in the list</span>
 88:           <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">app_xml</span> <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">text_xml</span>
 89:             <span class="ruby-identifier">list</span>[<span class="ruby-identifier">app_xml</span>], <span class="ruby-identifier">list</span>[<span class="ruby-identifier">text_xml</span>] = <span class="ruby-identifier">list</span>[<span class="ruby-identifier">text_xml</span>], <span class="ruby-identifier">list</span>[<span class="ruby-identifier">app_xml</span>]
 90:             <span class="ruby-identifier">app_xml</span>, <span class="ruby-identifier">text_xml</span> = <span class="ruby-identifier">text_xml</span>, <span class="ruby-identifier">app_xml</span>
 91:           <span class="ruby-keyword kw">end</span>
 92: 
 93:           <span class="ruby-comment cmt"># delete text_xml from the list</span>
 94:           <span class="ruby-identifier">list</span>.<span class="ruby-identifier">delete_at</span>(<span class="ruby-identifier">text_xml</span>)
 95: 
 96:         <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">text_xml</span>
 97:           <span class="ruby-identifier">list</span>[<span class="ruby-identifier">text_xml</span>].<span class="ruby-identifier">name</span> = <span class="ruby-constant">Mime</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span>.<span class="ruby-identifier">to_s</span>
 98:         <span class="ruby-keyword kw">end</span>
 99: 
100:         <span class="ruby-comment cmt"># Look for more specific xml-based types and sort them ahead of app/xml</span>
101: 
102:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">app_xml</span>
103:           <span class="ruby-identifier">idx</span> = <span class="ruby-identifier">app_xml</span>
104:           <span class="ruby-identifier">app_xml_type</span> = <span class="ruby-identifier">list</span>[<span class="ruby-identifier">app_xml</span>]
105: 
106:           <span class="ruby-keyword kw">while</span>(<span class="ruby-identifier">idx</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">list</span>.<span class="ruby-identifier">length</span>)
107:             <span class="ruby-identifier">type</span> = <span class="ruby-identifier">list</span>[<span class="ruby-identifier">idx</span>]
108:             <span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">type</span>.<span class="ruby-identifier">q</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">app_xml_type</span>.<span class="ruby-identifier">q</span>
109:             <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">type</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\+xml$/</span>
110:               <span class="ruby-identifier">list</span>[<span class="ruby-identifier">app_xml</span>], <span class="ruby-identifier">list</span>[<span class="ruby-identifier">idx</span>] = <span class="ruby-identifier">list</span>[<span class="ruby-identifier">idx</span>], <span class="ruby-identifier">list</span>[<span class="ruby-identifier">app_xml</span>]
111:               <span class="ruby-identifier">app_xml</span> = <span class="ruby-identifier">idx</span>
112:             <span class="ruby-keyword kw">end</span>
113:             <span class="ruby-identifier">idx</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
114:           <span class="ruby-keyword kw">end</span>
115:         <span class="ruby-keyword kw">end</span>
116: 
117:         <span class="ruby-identifier">list</span>.<span class="ruby-identifier">map!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-constant">Mime</span><span class="ruby-operator">::</span><span class="ruby-constant">Type</span>.<span class="ruby-identifier">lookup</span>(<span class="ruby-identifier">i</span>.<span class="ruby-identifier">name</span>) }.<span class="ruby-identifier">uniq!</span>
118:         <span class="ruby-identifier">list</span>
119:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001651" class="method-detail">
        <a name="M001651"></a>

        <div class="method-heading">
          <a href="#M001651" class="method-signature">
          <span class="method-name">register</span><span class="method-args">(string, symbol, mime_type_synonyms = [], extension_synonyms = [], skip_lookup = false)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001651-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001651-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/mime_type.rb, line 61</span>
61:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">register</span>(<span class="ruby-identifier">string</span>, <span class="ruby-identifier">symbol</span>, <span class="ruby-identifier">mime_type_synonyms</span> = [], <span class="ruby-identifier">extension_synonyms</span> = [], <span class="ruby-identifier">skip_lookup</span> = <span class="ruby-keyword kw">false</span>)
62:         <span class="ruby-constant">Mime</span>.<span class="ruby-identifier">instance_eval</span> { <span class="ruby-identifier">const_set</span> <span class="ruby-identifier">symbol</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">upcase</span>, <span class="ruby-constant">Type</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">string</span>, <span class="ruby-identifier">symbol</span>, <span class="ruby-identifier">mime_type_synonyms</span>) }
63: 
64:         <span class="ruby-constant">SET</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">Mime</span>.<span class="ruby-identifier">const_get</span>(<span class="ruby-identifier">symbol</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">upcase</span>)
65: 
66:         ([<span class="ruby-identifier">string</span>] <span class="ruby-operator">+</span> <span class="ruby-identifier">mime_type_synonyms</span>).<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">string</span><span class="ruby-operator">|</span> <span class="ruby-constant">LOOKUP</span>[<span class="ruby-identifier">string</span>] = <span class="ruby-constant">SET</span>.<span class="ruby-identifier">last</span> } <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">skip_lookup</span>
67:         ([<span class="ruby-identifier">symbol</span>.<span class="ruby-identifier">to_s</span>] <span class="ruby-operator">+</span> <span class="ruby-identifier">extension_synonyms</span>).<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">ext</span><span class="ruby-operator">|</span> <span class="ruby-constant">EXTENSION_LOOKUP</span>[<span class="ruby-identifier">ext</span>] = <span class="ruby-constant">SET</span>.<span class="ruby-identifier">last</span> }
68:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001650" class="method-detail">
        <a name="M001650"></a>

        <div class="method-heading">
          <a href="#M001650" class="method-signature">
          <span class="method-name">register_alias</span><span class="method-args">(string, symbol, extension_synonyms = [])</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Registers an alias that&#8216;s not used on mime type <a
href="Type.html#M001648">lookup</a>, but can be referenced directly.
Especially useful for rendering different HTML versions depending on the
user agent, like an iPhone.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001650-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001650-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/mime_type.rb, line 57</span>
57:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">register_alias</span>(<span class="ruby-identifier">string</span>, <span class="ruby-identifier">symbol</span>, <span class="ruby-identifier">extension_synonyms</span> = [])
58:         <span class="ruby-identifier">register</span>(<span class="ruby-identifier">string</span>, <span class="ruby-identifier">symbol</span>, [], <span class="ruby-identifier">extension_synonyms</span>, <span class="ruby-keyword kw">true</span>)
59:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M001658" class="method-detail">
        <a name="M001658"></a>

        <div class="method-heading">
          <a href="#M001658" class="method-signature">
          <span class="method-name">==</span><span class="method-args">(mime_type)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001658-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001658-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/mime_type.rb, line 147</span>
147:     <span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">mime_type</span>)
148:       (<span class="ruby-ivar">@synonyms</span> <span class="ruby-operator">+</span> [ <span class="ruby-keyword kw">self</span> ]).<span class="ruby-identifier">any?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">synonym</span><span class="ruby-operator">|</span> <span class="ruby-identifier">synonym</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">mime_type</span>.<span class="ruby-identifier">to_s</span> } <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">mime_type</span>
149:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001657" class="method-detail">
        <a name="M001657"></a>

        <div class="method-heading">
          <a href="#M001657" class="method-signature">
          <span class="method-name">===</span><span class="method-args">(list)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001657-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001657-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/mime_type.rb, line 139</span>
139:     <span class="ruby-keyword kw">def</span> <span class="ruby-operator">===</span>(<span class="ruby-identifier">list</span>)
140:       <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">list</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
141:         (<span class="ruby-ivar">@synonyms</span> <span class="ruby-operator">+</span> [ <span class="ruby-keyword kw">self</span> ]).<span class="ruby-identifier">any?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">synonym</span><span class="ruby-operator">|</span> <span class="ruby-identifier">list</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">synonym</span>) }
142:       <span class="ruby-keyword kw">else</span>
143:         <span class="ruby-keyword kw">super</span>
144:       <span class="ruby-keyword kw">end</span>
145:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001654" class="method-detail">
        <a name="M001654"></a>

        <div class="method-heading">
          <a href="#M001654" class="method-signature">
          <span class="method-name">to_s</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001654-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001654-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/mime_type.rb, line 127</span>
127:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
128:       <span class="ruby-ivar">@string</span>
129:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001655" class="method-detail">
        <a name="M001655"></a>

        <div class="method-heading">
          <a href="#M001655" class="method-signature">
          <span class="method-name">to_str</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001655-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001655-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/mime_type.rb, line 131</span>
131:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_str</span>
132:       <span class="ruby-identifier">to_s</span>
133:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001656" class="method-detail">
        <a name="M001656"></a>

        <div class="method-heading">
          <a href="#M001656" class="method-signature">
          <span class="method-name">to_sym</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001656-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001656-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/mime_type.rb, line 135</span>
135:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_sym</span>
136:       <span class="ruby-ivar">@symbol</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@string</span>.<span class="ruby-identifier">to_sym</span>
137:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>